﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace MvcMovieNew.Models
{
    public class Movie
    {
        public int ID { get; set; }                
        [Required]
        public String Title { get; set; }
        
        [DataType(DataType.Date)]
        public DateTime ReleaseDate { get; set; }

        [Required]
        public String Genre { get; set; }

        [Range(1,100)]
        public Decimal price { get; set; }
        
        [StringLength(5)]
        public String Rating { get; set; }
    }

    public class MovieDbContext :DbContext
    {
        public DbSet<Movie> Movies { get; set; }
    }
}